{% extends "base.html" %}



{% block title %}
{% if section != '' %}
RMG Solvation {{ section|title }}
{% else %}
RMG Solvation Database
{% endif %}
{% endblock %}

{% block extrahead %}{% endblock %}

{% block navbar_items %}
<li><a href="{% url 'database:index' %}">Database</a></li>
<li><a href="{% url 'database:solvation' %}">solvation</a></li>
{% if section != '' %}<li><a href="{% url 'database:solvation' section=section %}">{{ section|title }}</a></li>
{% if subsection != '' %}<li><a href="{% url 'database:solvation' section=section subsection=subsection %}">{{ subsection|title }}</a></li>{% endif %}
{% endif %}
{% endblock %}

{% block sidebar_items %}
{% endblock %}

{% block page_title %}
{% if section != '' %}
RMG Solvation {{ section|title }}
{% else %}
RMG Solvation Database
{% endif %}
{% endblock %}

{% block page_body %}

<p>For details on the solute and solvent descriptors and solvation groups, please refer to <a href="http://reactionmechanismgenerator.github.io/RMG-Py/users/rmg/liquids.html">
   Solvation Thermochemistry</a> in documentation.</p>

{% if section == '' %}
<h2>1. <a href="{% url 'database:solvation-search' %}">Solvation Search</a></h2>
{% endif %}

{% if section == '' %}
<h2>2. <a href="{% url 'database:solvation' section='libraries' %}">Solvation Libraries</a></h2>
{% endif %}

{% if section == 'libraries' or section == '' %}
<ul>
{% for subsection, library in solvationLibraries %}
<li><a href="{% url 'database:solvation' section='libraries' subsection=subsection %}">{{ library.name }}</a> ({{ library.entries|length }} entries)</li>
{% endfor %}
</ul>
{% endif %}

{% if section == '' %}
<h2>3. <a href="{% url 'database:solvation' section='groups' %}"> Solvation Groups</a></h2>
{% endif %}

{% if section == 'groups' or section == '' %}
<ul>
    {# <li><a href="{% url 'database:solvation' section='groups' subsection='group' %}">{{ solvationDatabase.groups.group.name }}</a> ({{ solvationDatabase.groups.group.entries|length }} entries)</li> #}
{% for subsection, groups in solvationGroups %}
    <li><a href="{% url 'database:solvation' section='groups' subsection=subsection %}">{{ groups.label }}</a> ({{ groups.entries|length }} entries)</li>
{% endfor %}

</ul>
{% endif %}

{% endblock %}
